/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.sunspotworld;

import com.sun.spot.sensorboard.peripheral.ISwitch;
import com.sun.spot.sensorboard.peripheral.ISwitchListener;
import org.sunspotworld.StartApplication.*;
/**
 *
 * @author Tomas Henriquez, Sabin Larrañaga
 */
public class ISwitchListenerImplSw1 implements ISwitchListener{


    StartApplication sa;

    public ISwitchListenerImplSw1(StartApplication sa) {
        this.sa = sa;
    }
    /**
     * //here is where we manage the flag values. This procedure will be launch when the left switch is pressed
     * @param sw
     */
    public void switchPressed(ISwitch sw) {
        sa.setMoveFlag(true);
}

    public void switchReleased(ISwitch sw) {
        sa.setMoveFlag(false);
    }

}
